import request from '@/utils/request'

// 获取可申请的岗位列表
export function getAvailablePositions(params) {
  const { page = 0, size = 10, categoryId, search = '' } = params || {}
  return request({
    url: '/api/student/jobs/positions',
    method: 'get',
    params: {
      page,
      size,
      categoryId,
      search
    }
  })
}

// 申请岗位
export function applyPosition(id, data) {
  return request({
    url: `/api/student/jobs/positions/${id}/apply`,
    method: 'post',
    data
  })
} 